﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Configuration;
using System.Drawing;
using System.ComponentModel;

namespace Softyum.ForexAgent.Config
{
    sealed public class PopupWindowSettings : ApplicationSettingsBase
    {
        [UserScopedSettingAttribute()]
        [DefaultSettingValueAttribute("5, 5")]
        [Category("Appearance"), Description("标题显示位置")]
        public Point TitlePos
        {
            get { return (Point)this[TITLE_POS]; }
            set { this[TITLE_POS] = value; }
        }
        public const string TITLE_POS = "TitlePos";

        [UserScopedSettingAttribute()]
        [DefaultSettingValueAttribute("5, 5")]
        [Category("Appearance"), Description("正文显示位置")]
        public Point TextPos
        {
            get { return (Point)this[TEXT_POS]; }
            set { this[TEXT_POS] = value; }
        }
        public const string TEXT_POS = "TextPos";

        [UserScopedSettingAttribute()]
        [DefaultSettingValueAttribute("False")]
        [Category("Action"), Description("是否启用气泡提示替代标准弹出窗口")]
        public Boolean UseBalloonTip
        {
            get { return (Boolean)this[USE_BALLOONTIP]; }
            set { this[USE_BALLOONTIP] = value; }
        }
        public const string USE_BALLOONTIP = "UseBalloonTip";

        #region 自动关闭
        /// <summary>
        /// 
        /// </summary>
        [UserScopedSettingAttribute()]
        [DefaultSettingValueAttribute("6000")]
        [Category("Action"), Description("显示持续时间(微秒)")]
        public Int32 AutoCloseTimer
        {
            get { return (int)this[AUTO_CLOSE_TIMER]; }
            set { this[AUTO_CLOSE_TIMER] = value; }
        }
        public const string AUTO_CLOSE_TIMER = "AutoCloseTimer";
        #endregion

        /// <summary>
        /// 
        /// </summary>
        [Category("Appearance"), Description("Font")]
        [UserScopedSettingAttribute()]
        [DefaultSettingValueAttribute("Microsoft Sans Serif, 8.25pt")]
        public Font Font
        {
            get { return (Font)this[FONT]; }
            set { this[FONT] = value; }
        }
        public const string FONT = "Font";

        /// <summary>
        /// Title Font
        /// </summary>
        [Category("Appearance"), Description("TitleFont")]
        [UserScopedSettingAttribute()]
        [DefaultSettingValueAttribute("Microsoft Sans Serif, 12pt, style=Bold, Italic")]
        public Font TitleFont
        {
            get { return (Font)this[TITLE_FONT]; }
            set { this[TITLE_FONT] = value; }
        }
        public const string TITLE_FONT = "TitleFont";

        

        /// <summary>
        /// 窗口最小尺寸
        /// </summary>
        [UserScopedSettingAttribute()]
        [Category("Appearance"), Description("窗口最小尺寸")]
        [DefaultSettingValueAttribute("250,150")]
        public Size MinimumSize
        {
            get { return (Size)this[MINIMUM_SIZE]; }
            set { this[MINIMUM_SIZE] = value; }
        }
        public const string MINIMUM_SIZE = "MinimumSize";

        /// <summary>
        /// 
        /// </summary>
        [UserScopedSettingAttribute()]
        [Category("Appearance"), Description("窗口圆角")]
        [DefaultSettingValueAttribute("20")]
        public Int32 Radius
        {
            get { return (Int32)this[RADIUS]; }
            set { this[RADIUS] = value; }
        }
        public const string RADIUS = "Radius";

        #region 边框
        /// <summary>
        /// 边框线条
        /// </summary>
        [UserScopedSettingAttribute()]
        [Category("边框外观"), Description("边框线条")]
        [DefaultSettingValueAttribute("8")]
        public Int32 BorderWidth
        {
            get { return (Int32)this[BORDER_WIDTH]; }
            set { this[BORDER_WIDTH] = value; }
        }
        public const string BORDER_WIDTH = "BorderWidth";


        #endregion

        #region 窗体渐变色
        /// <summary>
        /// 
        /// </summary>
        [UserScopedSettingAttribute()]
        [Category("窗体外观"), Description("使用渐变色渲染窗体")]
        [DefaultSettingValueAttribute("true")]
        public Boolean UseLinearGradient
        {
            get { return (Boolean)this[USE_LINEAR_GRADIENT]; }
            set { this[USE_LINEAR_GRADIENT] = value; }
        }
        public const string USE_LINEAR_GRADIENT = "UseLinearGradient";

        /// <summary>
        /// 
        /// </summary>
        [UserScopedSettingAttribute()]
        [Category("窗体外观"), Description("窗体渐变色角度")]
        [DefaultSettingValueAttribute("90")]
        public Int32 LinearGradientAngle
        {
            get { return (Int32)this[LINEAR_GRADIENT_ANGLE]; }
            set { this[LINEAR_GRADIENT_ANGLE] = value; }
        }
        public const string LINEAR_GRADIENT_ANGLE = "LinearGradientAngle";
        #endregion

        #region 配色方案
        /// <summary>
        /// Title Color
        /// </summary>
        [UserScopedSettingAttribute()]
        [Category("配色方案"), Description("TitleColor")]
        [DefaultSettingValueAttribute("#0064B8")]
        public Color TitleColor
        {
            get { return (Color)this[TITLE_COLOR]; }
            set { this[TITLE_COLOR] = value; }
        }
        public const string TITLE_COLOR = "TitleColor";

        /// <summary>
        /// 正文文本颜色
        /// </summary>
        [Category("配色方案"), Description("Fore color")]
        [UserScopedSettingAttribute()]
        [DefaultSettingValueAttribute("#281C04")]
        public Color ForeColor
        {
            get { return (Color)this[FORE_COLOR]; }
            set { this[FORE_COLOR] = value; }
        }
        public const string FORE_COLOR = "ForeColor";

        /// <summary>
        /// 边框颜色
        /// </summary>
        [UserScopedSettingAttribute()]
        [Category("配色方案"), Description("边框颜色")]
        [DefaultSettingValueAttribute("#75B800")]
        public Color BorderColor
        {
            get { return (Color)this[BORDER_COLOR]; }
            set { this[BORDER_COLOR] = value; }
        }
        public const string BORDER_COLOR = "BorderColor";

        /// <summary>
        /// 
        /// </summary>
        [UserScopedSettingAttribute()]
        [Category("配色方案"), Description("窗体开始颜色")]
        [DefaultSettingValueAttribute("#A1BF60")]
        public Color LinearGradientStart
        {
            get { return (Color)this[LINEAR_GRADIENT_START]; }
            set { this[LINEAR_GRADIENT_START] = value; }
        }
        public const string LINEAR_GRADIENT_START = "LinearGradientStart";

        /// <summary>
        /// 
        /// </summary>
        [UserScopedSettingAttribute()]
        [Category("配色方案"), Description("窗体结束颜色")]
        [DefaultSettingValueAttribute("#F1EDD4")]
        public Color LinearGradientEnd
        {
            get { return (Color)this[LINEAR_GRADIENT_END]; }
            set { this[LINEAR_GRADIENT_END] = value; }
        }
        public const string LINEAR_GRADIENT_END = "LinearGradientEnd";

        #endregion 
    }
}
